#pragma once

class M2BatchRender;

class M2Manager : public Singleton<M2Manager>
{
	std::map<std::string, M2BatchRender*> mBatches;
	Mutex renderLock;
	Shader& mShader;
public:
	M2Manager();

	ui32 addInstance(const std::string& modelName, MDDF df);
	void removeInstance(const std::string& modelName, ui32 id);
	void changeInstancePosition(const std::string& modelName, ui32 id, const Vertex3F& newPos);
	void render();
	Shader& getM2Shader() { return mShader; }
};

#define sM2Mgr (*M2Manager::GetInstance())